<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActiveScaffold</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActiveScaffold</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/vendor/plugins/active_scaffold/lib/active_scaffold_rb.html">
                vendor/plugins/active_scaffold/lib/active_scaffold.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/attribute_params_rb.html">
                vendor/plugins/active_scaffold/lib/attribute_params.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/bridges/bridge_rb.html">
                vendor/plugins/active_scaffold/lib/bridges/bridge.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge_rb.html">
                vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui_rb.html">
                vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui_rb.html">
                vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/configurable_rb.html">
                vendor/plugins/active_scaffold/lib/configurable.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/constraints_rb.html">
                vendor/plugins/active_scaffold/lib/constraints.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/exceptions_rb.html">
                vendor/plugins/active_scaffold/lib/exceptions.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/finder_rb.html">
                vendor/plugins/active_scaffold/lib/finder.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/helpers/association_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/association_helpers.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/helpers/controller_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/controller_helpers.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/helpers/form_column_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/helpers/id_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/id_helpers.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/helpers/list_column_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/helpers/pagination_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/pagination_helpers.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/active_scaffold/lib/helpers/view_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/view_helpers.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000078">active_scaffold_config</a>&nbsp;&nbsp;
      <a href="#M000079">active_scaffold_config_for</a>&nbsp;&nbsp;
      <a href="#M000080">active_scaffold_session_storage</a>&nbsp;&nbsp;
      <a href="#M000082">bridge</a>&nbsp;&nbsp;
      <a href="#M000081">handle_user_settings</a>&nbsp;&nbsp;
      <a href="#M000076">included</a>&nbsp;&nbsp;
      <a href="#M000077">set_defaults</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Module <a href="ActiveScaffold/Actions.html" class="link">ActiveScaffold::Actions</a><br />
Module <a href="ActiveScaffold/AttributeParams.html" class="link">ActiveScaffold::AttributeParams</a><br />
Module <a href="ActiveScaffold/ClassMethods.html" class="link">ActiveScaffold::ClassMethods</a><br />
Module <a href="ActiveScaffold/Config.html" class="link">ActiveScaffold::Config</a><br />
Module <a href="ActiveScaffold/Configurable.html" class="link">ActiveScaffold::Configurable</a><br />
Module <a href="ActiveScaffold/Constraints.html" class="link">ActiveScaffold::Constraints</a><br />
Module <a href="ActiveScaffold/DataStructures.html" class="link">ActiveScaffold::DataStructures</a><br />
Module <a href="ActiveScaffold/Finder.html" class="link">ActiveScaffold::Finder</a><br />
Module <a href="ActiveScaffold/Helpers.html" class="link">ActiveScaffold::Helpers</a><br />
Class <a href="ActiveScaffold/Bridge.html" class="link">ActiveScaffold::Bridge</a><br />
Class <a href="ActiveScaffold/ControllerNotFound.html" class="link">ActiveScaffold::ControllerNotFound</a><br />
Class <a href="ActiveScaffold/DependencyFailure.html" class="link">ActiveScaffold::DependencyFailure</a><br />
Class <a href="ActiveScaffold/MalformedConstraint.html" class="link">ActiveScaffold::MalformedConstraint</a><br />
Class <a href="ActiveScaffold/RecordNotAllowed.html" class="link">ActiveScaffold::RecordNotAllowed</a><br />
Class <a href="ActiveScaffold/ReverseAssociationRequired.html" class="link">ActiveScaffold::ReverseAssociationRequired</a><br />

    </div>




      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000082" class="method-detail">
        <a name="M000082"></a>

        <div class="method-heading">
          <a href="#M000082" class="method-signature">
          <span class="method-name">bridge</span><span class="method-args">(name, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000082-source">
<pre>
   <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/bridges/bridge.rb, line 2</span>
2:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bridge</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
3:     <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">Bridge</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
4:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000076" class="method-detail">
        <a name="M000076"></a>

        <div class="method-heading">
          <a href="#M000076" class="method-signature">
          <span class="method-name">included</span><span class="method-args">(base)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000076-source">
<pre>
   <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/active_scaffold.rb, line 2</span>
2:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
3:     <span class="ruby-identifier">base</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-constant">ClassMethods</span>)
4:     <span class="ruby-identifier">base</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
5:       <span class="ruby-comment cmt"># TODO: these should be in actions/core</span>
6:       <span class="ruby-identifier">before_filter</span> <span class="ruby-identifier">:handle_user_settings</span>
7:     <span class="ruby-keyword kw">end</span>
8:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000077" class="method-detail">
        <a name="M000077"></a>

        <div class="method-heading">
          <a href="#M000077" class="method-signature">
          <span class="method-name">set_defaults</span><span class="method-args">(&amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000077-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/active_scaffold.rb, line 10</span>
10:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set_defaults</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
11:     <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">Core</span>.<span class="ruby-identifier">configure</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
12:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000078" class="method-detail">
        <a name="M000078"></a>

        <div class="method-heading">
          <a href="#M000078" class="method-signature">
          <span class="method-name">active_scaffold_config</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000078-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/active_scaffold.rb, line 14</span>
14:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_config</span>
15:     <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">active_scaffold_config</span>
16:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000079" class="method-detail">
        <a name="M000079"></a>

        <div class="method-heading">
          <a href="#M000079" class="method-signature">
          <span class="method-name">active_scaffold_config_for</span><span class="method-args">(klass)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000079-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/active_scaffold.rb, line 18</span>
18:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_config_for</span>(<span class="ruby-identifier">klass</span>)
19:     <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">active_scaffold_config_for</span>(<span class="ruby-identifier">klass</span>)
20:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000080" class="method-detail">
        <a name="M000080"></a>

        <div class="method-heading">
          <a href="#M000080" class="method-signature">
          <span class="method-name">active_scaffold_session_storage</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000080-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/active_scaffold.rb, line 22</span>
22:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_session_storage</span>
23:     <span class="ruby-identifier">id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:eid</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:controller</span>]
24:     <span class="ruby-identifier">session_index</span> = <span class="ruby-node">&quot;as:#{id}&quot;</span>
25:     <span class="ruby-identifier">session</span>[<span class="ruby-identifier">session_index</span>] <span class="ruby-operator">||=</span> {}
26:     <span class="ruby-identifier">session</span>[<span class="ruby-identifier">session_index</span>]
27:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000081" class="method-detail">
        <a name="M000081"></a>

        <div class="method-heading">
          <a href="#M000081" class="method-signature">
          <span class="method-name">handle_user_settings</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
at some point we need to pass the session and params into config.
we&#8216;ll just take care of that before any particular action occurs by
passing those hashes off to the UserSettings class of each action.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000081-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/active_scaffold.rb, line 30</span>
30:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_user_settings</span>
31:     <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">uses_active_scaffold?</span>
32:       <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">actions</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">action_name</span><span class="ruby-operator">|</span>
33:         <span class="ruby-identifier">conf_instance</span> = <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">action_name</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">next</span>
34:         <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">conf_instance</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">UserSettings</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span><span class="ruby-operator">::</span><span class="ruby-constant">UserSettings</span> <span class="ruby-comment cmt"># if it hasn't been extended, skip it</span>
35:         <span class="ruby-identifier">active_scaffold_session_storage</span>[<span class="ruby-identifier">action_name</span>] <span class="ruby-operator">||=</span> {}
36:         <span class="ruby-identifier">conf_instance</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">conf_instance</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">UserSettings</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">conf_instance</span>, <span class="ruby-identifier">active_scaffold_session_storage</span>[<span class="ruby-identifier">action_name</span>], <span class="ruby-identifier">params</span>)
37:       <span class="ruby-keyword kw">end</span>
38:     <span class="ruby-keyword kw">end</span>
39:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>